<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8"/>
	<title>东海航海保障中心电子档案系统</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1" name="viewport"/>
	<meta content="" name="description"/>
	<meta content="" name="author"/>
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
	<link href="/static/assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/fullcalendar/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/jqvmap/jqvmap/jqvmap.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css"/>
	<!-- END PAGE LEVEL PLUGIN STYLES -->
	<!-- BEGIN THEME STYLES -->
	<link href="/static/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/pages/tasks.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/themes/default.css" rel="stylesheet" type="text/css">
	<link href="/static/assets/css/print.css" rel="stylesheet" type="text/css" media="print"/>
	<link href="/static/assets/css/custom.css" rel="stylesheet" type="text/css"/>
	<!-- END THEME STYLES -->
	<link rel="shortcut icon" href="favicon.ico"/>
    
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">

<!-- BEGIN HEADER -->
<div class="header navbar navbar-fixed-top">
	<!-- BEGIN TOP NAVIGATION BAR -->
	<div class="header-inner">
		<!-- BEGIN LOGO -->
		<a class="navbar-brand" href="index.html" style="margin-top: -8px;">
			<img src="/static/assets/img/logo.png" alt="logo" class="img-responsive"/ width="30">
		</a>
		<!-- END LOGO -->
		<!-- BEGIN RESPONSIVE MENU TOGGLER -->
		<div class="hor-menu hidden-sm hidden-xs">
			<ul class="nav navbar-nav">
				<!-- <li class="classic-menu-dropdown active">
					<a href="index.html">
						 Dashboard
						<span class="selected">
						</span>
					</a>
				</li> -->
				<li class="mega-menu-dropdown">
					<a href="/" data-hover="dropdown" data-close-others="true" href="" class="dropdown-toggle">
						我的工作台 <!-- <i class="fa fa-angle-down"></i> -->
					</a>

				</li>
				<li  class="mega-menu-dropdown mega-menu-full open">
					<a data-hover="dropdown" data-close-others="true" href="{:url('index/Search/index')}" class="dropdown-toggle">
						档案查询 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
				</li>
				<li class="mega-menu-dropdown mega-menu-full">
					<a data-hover="dropdown" data-close-others="true" href="{:url('index/Prearc/index')}?cate_id=-1" class="dropdown-toggle">
						档案管理 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
				<li>
					<li class="mega-menu-dropdown mega-menu-full">
					<a data-hover="dropdown" data-close-others="true" href="{:url('index/Message/index')}?cate_id=-1" class="dropdown-toggle">
						消息管理 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
				<li>
					<li class="mega-menu-dropdown mega-menu-full">
					<a data-hover="dropdown" data-close-others="true" href="{:url('index/Suggest/index')}" class="dropdown-toggle">
						意见反馈 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
		</div>

		<a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
			<img src="/static/assets/img/menu-toggler.png" alt=""/>
		</a>
		<!-- END RESPONSIVE MENU TOGGLER -->
		<!-- BEGIN TOP NAVIGATION MENU -->
		
		<ul class="nav navbar-nav pull-right">
			<!-- BEGIN NOTIFICATION DROPDOWN -->
			<li class="dropdown" id="header_notification_bar" style="display: none;">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<i class="fa fa-warning"></i>
					<span id="notnum">
						 
					</span>
				</a>
				<ul class="dropdown-menu extended notification">
					<li>
						<p>
							 <span id="noticenum"></span>
						</p>
					</li>
					<!-- <li id="papa"  style="overflow: hidden;max-height: 200px;"> -->
					<li id=""  style="overflow: hidden;max-height: 200px;">

						<!-- <i class="fa fa-bell-o"></i> -->
					<li>
						
					</li>
					<li class="external">
						<a href="{:url('index/Inbox/checknotice')}">
							 查看更多 <i class="m-icon-swapright"></i>
						</a>
					</li>
				</ul>
			</li>
			<!-- END NOTIFICATION DROPDOWN -->
			<!-- BEGIN INBOX DROPDOWN -->
			<li class="dropdown" id="header_inbox_bar">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<i class="fa fa-envelope"></i>
					<span id="mailnum" >

					</span>
				</a>
				<ul class="dropdown-menu extended inbox" style="">
					<li>
						<p>
							 <span id="messagenum"></span>

						</p>
					</li>

					<li id="baba"  style="overflow: hidden;max-height: 200px;">
						
					</li>
					<li class="external">
						<a href="{:url('index/Message/index')}">
							 查看更多 <i class="m-icon-swapright"></i>
						</a>
						
					</li>
				</ul>
			</li>
			<script>
				
			</script>
			<!-- END INBOX DROPDOWN -->
			<!-- BEGIN TODO DROPDOWN -->

			<!-- END TODO DROPDOWN -->
			<!-- BEGIN USER LOGIN DROPDOWN -->
			<li class="dropdown user">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<!-- <img alt="" src="/static/assets/img/avatar1_small.jpg"/> -->
					<span class="username">
						{$_SESSION['think']['username'][0]['user_name']}
					</span>
					<i class="fa fa-angle-down"></i>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="{:url('index/user/index')}">
							<i class="fa fa-user"></i> 个人中心
						</a>
					</li>
					
					
					<li class="divider">
					</li>
					<li>
						<a href="javascript:;" id="trigger_fullscreen">
							<i class="fa fa-arrows"></i> 全屏
						</a>
					</li>
					
					<li>
						<a href="{:url('index/logout/index')}">
							<i class="fa fa-key"></i> 注销
						</a>
					</li>
				</ul>
			</li>
			<!-- END USER LOGIN DROPDOWN -->
		</ul>

		<!-- END TOP NAVIGATION MENU -->
	</div>
	<!-- END TOP NAVIGATION BAR -->
</div>
<!-- END HEADER -->
<div class="clearfix">
</div>

<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<div class="page-sidebar-wrapper">
		<div class="page-sidebar navbar-collapse collapse">
			<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
			<!-- BEGIN SIDEBAR MENU -->
			<ul class="page-sidebar-menu" data-auto-scroll="true" data-slide-speed="200">
				<li class="sidebar-toggler-wrapper">
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone">
					</div>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
				<!-- {if  $node[0]['menu_name'] == 'level1'}  -->
				<li class="search">
					<a href="{:url('index/Search/index')}">
						<i class="fa fa-shopping-cart"></i>
						<span class="title">
							档案查询
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
				<li class="query">
					<a href="{:url('index/Query/index')}">
						<i class="fa fa-shopping-cart"></i>
						<span class="title">
							档案目录
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
				
				
				
			</ul>
			<!-- END SIDEBAR MENU -->
		</div>
	</div>
	<div class="modal fade" id="model1" tabindex="-1" role="model1" aria-hidden="true" style="display: none;">

		<!-- /.modal-dialog -->
	</div>
	<script src="/static/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="/static/assets/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script src="/static/assets/plugins/jqvmap/jqvmap/jquery.vmap.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.resize.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.categories.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.pulsate.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-daterangepicker/moment.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-daterangepicker/daterangepicker.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/gritter/js/jquery.gritter.js" type="text/javascript"></script>
	<!-- IMPORTANT! fullcalendar depends on jquery-ui-1.10.3.custom.min.js for drag & drop support -->
	<script src="/static/assets/plugins/fullcalendar/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-easy-pie-chart/jquery.easy-pie-chart.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.sparkline.min.js" type="text/javascript"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<!-- <script src="/static/assets/scripts/core/app.js" type="text/javascript"></script> -->
	<!-- <script src="/static/assets/scripts/custom/index.js" type="text/javascript"></script> -->
	<script src="/static/assets/scripts/custom/tasks.js" type="text/javascript"></script>

<!-- END PAGE LEVEL SCRIPTS -->


<script type="text/javascript">
var DDSPEED = 10;
var DDTIMER = 15;
var OFFSET = -2;
var ZINT = 100;
function ddMenu(id,d){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearInterval(c.timer);
 if(d == 1){
  clearTimeout(h.timer);
  c.style.display = 'block';
  if(c.maxh && c.maxh <= c.offsetHeight){return}
  else if(!c.maxh){
   c.style.left = (h.offsetWidth + OFFSET) + 'px';
   c.style.height = 'auto';
   c.maxh = c.offsetHeight;
   c.style.height = '0px';
  }
  ZINT = ZINT + 1;
  c.style.zIndex = ZINT;
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }else{
  h.timer = setTimeout(function(){ddCollapse(c)},50);
 }
}
function ddCollapse(c){
 c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}
function cancelHide(id){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearTimeout(h.timer);
 clearInterval(c.timer);
 if(c.offsetHeight < c.maxh){
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }
}
function ddSlide(c,d){
 var currh = c.offsetHeight;
 var dist;
 if(d == 1){
  dist = Math.round((c.maxh - currh) / DDSPEED);
 }else{
  dist = Math.round(currh / DDSPEED);
 }
 if(dist <= 1 && d == 1){
  dist = 1;
 }
 c.style.height = currh + (dist * d) + 'px';
 c.style.opacity = currh / c.maxh;
 c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
 if(currh > (c.maxh - 2) && d == 1){
  clearInterval(c.timer);
 }else if(dist < 1 && d != 1){
  clearInterval(c.timer);
  c.style.display = 'none';
 }
}
</script>
<!-- END JAVASCRIPTS -->
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery(document).ready(function() {    
   // App.init(); // initlayout and core plugins
   // Index.init();
   // Index.initJQVMAP(); // init index page's custom scripts
   // Index.initCalendar(); // init index page's custom scripts
   // Index.initCharts(); // init index page's custom scripts
   // Index.initChat();
   // Index.initMiniCharts();
   // Index.initDashboardDaterange();
   // Index.initIntro();
   // Tasks.initDashboardWidget();
});
</script>
<script type="text/javascript">
var DDSPEED = 10;
var DDTIMER = 15;
var OFFSET = -2;
var ZINT = 100;
function ddMenu(id,d){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearInterval(c.timer);
 if(d == 1){
  clearTimeout(h.timer);
  c.style.display = 'block';
  if(c.maxh && c.maxh <= c.offsetHeight){return}
  else if(!c.maxh){
   c.style.left = (h.offsetWidth + OFFSET) + 'px';
   c.style.height = 'auto';
   c.maxh = c.offsetHeight;
   c.style.height = '0px';
  }
  ZINT = ZINT + 1;
  c.style.zIndex = ZINT;
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }else{
  h.timer = setTimeout(function(){ddCollapse(c)},50);
 }
}
function ddCollapse(c){
 c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}
function cancelHide(id){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearTimeout(h.timer);
 clearInterval(c.timer);
 if(c.offsetHeight < c.maxh){
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }
}
function ddSlide(c,d){
 var currh = c.offsetHeight;
 var dist;
 if(d == 1){
  dist = Math.round((c.maxh - currh) / DDSPEED);
 }else{
  dist = Math.round(currh / DDSPEED);
 }
 if(dist <= 1 && d == 1){
  dist = 1;
 }
 c.style.height = currh + (dist * d) + 'px';
 c.style.opacity = currh / c.maxh;
 c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
 if(currh > (c.maxh - 2) && d == 1){
  clearInterval(c.timer);
 }else if(dist < 1 && d != 1){
  clearInterval(c.timer);
  c.style.display = 'none';
 }
}
</script>
<!-- END JAVASCRIPTS -->

</body>
<!-- END BODY -->
</html>
<script>
	$(function(){
        	setInterval(getNew,5000);
        	// getNew();
    });

        	var id = <?php echo json_encode($_SESSION['think']['username'][0]['user_id']);?>;
        function getNew(){
            $.ajax({
                type:"POST",
                url:"{:url('index/Top/message')}",
                data:{id:id}, 
                dataType:'json',
                success:function(data){
                	if (data.length == 0) {
                		// 去除class
                		// $('#mailnum').removeClass();
                		$('#messagenum').html('暂无公告');
                	}else{
                		$('#mailnum').addClass('badge');
                		$('#mailnum').html(data.length);
                		$('#messagenum').html('你有'+data.length+'条公告。');
                		$('#baba').empty();
                		for(var i = 0; i <data.length ; i++){
// 
                			$('#baba').append('<a href="{:url("index/inbox/check")}?id='+data[i]['mail_id']+'"><span class="message">'+data[i]['mail_title']+'</span></a>');
                			// $('#baba').css('max-height','200px');
                			// console.log(data[i]['mail_id']);
                			// $('<span>'+$data[i]['mail_title']+'</span>').appendTo('.baba');
                		}
                		
						$(".message").each(function() {
					    if ($(this).text().length > 15) {
					        $(this).html($(this).text().replace(/\s+/g, "").substr(0, 15) + "...")
					    }
					})
                		
                	}

                },
                //Ajax请求超时，继续查询
                error:function(XMLHttpRequest,textStatus,errorThrown){
                   
                }
 
            });
        }
 
    // 
</script>

	<!-- // 查询未读公告 -->
<!-- <script>
	$(function(){
		setInterval(getNotice,5000);
		// getNotice();
    });
        var id = <?php echo json_encode($_SESSION['think']['username'][0]['user_id']);?>;
        function getNotice(){
            $.ajax({
                type:"POST",
                url:"{:url('index/Top/notices')}",
                data:{id:id}, 
                dataType:'json',
                success:function(res){
                	if (res.length == 0 ) {
                		// 去除class
                		// $('#notnum').removeClass();
                		$('#noticenum').html('暂无公告');
                	}else{
                		$('#notnum').addClass('badge');
                		$('#notnum').html(res.length);
                		$('#noticenum').html('你有'+res.length+'条公告。');
                		$('#papa').empty();
                		for(var i = 0; i <res.length ; i++){
// 
                			$('#papa').append('<a href="{:url("index/inbox/check")}?id='+res[i]['mail_id']+'"><span class="notice">'+res[i]['mail_title']+'</span></a>');
                			// console.log(data[i]['mail_id']);
                			// $('<span>'+$data[i]['mail_title']+'</span>').appendTo('.baba');
                		}
                		
						$(".notice").each(function() {
					    if ($(this).text().length > 15) {
					        $(this).html($(this).text().replace(/\s+/g, "").substr(0, 15) + "...")
					    }
					})
                		
                	}

                },
                //Ajax请求超时，继续查询
                error:function(XMLHttpRequest,textStatus,errorThrown){
                   
                }
 
            });
        }
 
</script> -->

<!-- <script>
	$(function(){
		$('.inbox').click(function(){
		$('.inbox').addClass("active");
	});
	});
</script> -->
{block name="main"}

{/block}
<!-- 查询未读邮件 -->
